<template>
	<view class="my-search">
		<view class="my-search-box" @click="toSearch">
			<uni-icons type="search" size="30"></uni-icons>
			<text class="placeholder">搜索</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			};
		},
		methods:{
			toSearch(){
				
				//触发自定义事件myclick
				this.$emit('myclick')
			}
		}
	}
</script>

<style lang="scss">
	.my-search{
		height: 50px;
		background-color: #C00000;
		display: flex;
		align-items: center;
		padding: 0 10px;
		
		.my-search-box{
			height: 36px;
			background-color: white;
			border-radius: 20px;
			width: 100%;
			display: flex;
			justify-content: center;
			align-items: center;
			
			.placeholder{
				font-size: 15px;
				margin-left: 5px;
			}
		}
	}
</style>
